How to find the Generator of a cyclic group